c76eef
@@ -82,7 +82,11 @@
public static boolean isCustomInputType(VertexType vertex) {
 
   public TezWork(String queryId, Configuration conf) {
     this.dagId = queryId + ":" + (++counter);
-    this.queryName = (conf != null) ? DagUtils.getUserSpecifiedDagName(conf) : null;
+    String queryName = (conf != null) ? DagUtils.getUserSpecifiedDagName(conf) : null;
+    if (queryName == null) {
+      queryName = this.dagId;
+    }
+    this.queryName = queryName;
   }
 
   @Explain(displayName = "DagName")
